package com.bdqn.controller;

import com.bdqn.pojo.StockMedicines;
import com.bdqn.service.StockMedicinesService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("sm")
public class StockMedicinesController {
    @Autowired
    StockMedicinesService stockMedicinesService;
    @GetMapping("pageInfo")
    public PageInfo<StockMedicines> pageInfo(int pageNum, int pageSize, String medicinesName, String keywords, String medicinesType,String producterName, String prescriptionType, String status){
        PageInfo<StockMedicines> pageInfo=stockMedicinesService.pageInfo(pageNum,pageSize,medicinesName,keywords,medicinesType,producterName,prescriptionType,status);
        return pageInfo;
    }
}
